package com.silent.browser;

import android.app.Activity;  
import android.view.View;  
import android.view.View.OnClickListener;  
import android.os.Bundle; 
import android.content.Intent;  
import android.widget.*;
import android.util.Log;
 
public class Address extends Activity implements OnClickListener {  
    /** Called when the activity is first created. */  
    @Override  
    public void onCreate(Bundle savedInstanceState) {  
          
        super.onCreate(savedInstanceState);  
        setContentView(R.layout.address);  
         
        Button sButton = (Button)findViewById(R.id.button);  
     
        sButton.setOnClickListener(this);   
    }  
      
    public void onClick(View aView) {       
        switch (aView.getId()) {  
            case R.id.button:
                EditText edt = (EditText)findViewById(R.id.edt);
                String url = edt.getText().toString();
                Bundle extras = new Bundle();
                extras.putString("URL", url);
                Log.i("Address", url);
                setResult(RESULT_OK, new Intent(url).putExtras(extras));  
                finish();  
                break;  
        }    
    }  
}  